/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Frontera;

/**
 *
 * @author Juan
 */
public class FCustodia extends javax.swing.JFrame {

    /**
     * Creates new form FCustodia
     */
    public FCustodia() {
        initComponents();
        this.setLocationRelativeTo(null);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        BRegistrarAlmacenamiento = new javax.swing.JButton();
        BRegistrarSobrantes = new javax.swing.JButton();
        BRegistarDevolucionMuestra = new javax.swing.JButton();
        BRegresar = new javax.swing.JButton();
        BMuestrasRadioactivas = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Custodia de Muestras");
        setResizable(false);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Custodia de Muestras"));

        BRegistrarAlmacenamiento.setText("Registrar Almacenamiento");
        BRegistrarAlmacenamiento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BRegistrarAlmacenamientoActionPerformed(evt);
            }
        });

        BRegistrarSobrantes.setText("Registrar Devolución de Sobrantes");
        BRegistrarSobrantes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BRegistrarSobrantesActionPerformed(evt);
            }
        });

        BRegistarDevolucionMuestra.setText("Registrar Devolución o Disposición de Muestra");
        BRegistarDevolucionMuestra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BRegistarDevolucionMuestraActionPerformed(evt);
            }
        });

        BRegresar.setText("Regresar");
        BRegresar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BRegresarActionPerformed(evt);
            }
        });

        BMuestrasRadioactivas.setText("Muestras Radioactivas en Custodia");
        BMuestrasRadioactivas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BMuestrasRadioactivasActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(BRegistarDevolucionMuestra, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BRegistrarSobrantes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BRegistrarAlmacenamiento, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(BMuestrasRadioactivas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(BRegresar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(BRegistrarAlmacenamiento)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BRegistrarSobrantes)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BRegistarDevolucionMuestra)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BMuestrasRadioactivas)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BRegresar)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void BRegistrarAlmacenamientoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BRegistrarAlmacenamientoActionPerformed
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                FCustodia.this.setEnabled(false);
                new FMuestrasCustodia(FCustodia.this, FMuestrasCustodia.ALMACENAMIENTO).setVisible(true);
            }
        });
    }//GEN-LAST:event_BRegistrarAlmacenamientoActionPerformed

    private void BRegistrarSobrantesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BRegistrarSobrantesActionPerformed
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                FCustodia.this.setEnabled(false);
                new FMuestrasCustodia(FCustodia.this, FMuestrasCustodia.DEVOLUCION_SOBRANTES).setVisible(true);
            }
        });
    }//GEN-LAST:event_BRegistrarSobrantesActionPerformed

    private void BRegistarDevolucionMuestraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BRegistarDevolucionMuestraActionPerformed
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                FCustodia.this.setEnabled(false);
                new FMuestrasCustodia(FCustodia.this, FMuestrasCustodia.DEVOLUCION_O_DISPOSICION_MUESTRA).setVisible(true);
            }
        });
    }//GEN-LAST:event_BRegistarDevolucionMuestraActionPerformed

    private void BMuestrasRadioactivasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BMuestrasRadioactivasActionPerformed
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                FCustodia.this.setEnabled(false);
                new FMuestrasCustodia(FCustodia.this, FMuestrasCustodia.RADIOACTIVAS).setVisible(true);
            }
        });
    }//GEN-LAST:event_BMuestrasRadioactivasActionPerformed

    private void BRegresarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BRegresarActionPerformed
        dispose();
    }//GEN-LAST:event_BRegresarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FCustodia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FCustodia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FCustodia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FCustodia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new FCustodia().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BMuestrasRadioactivas;
    private javax.swing.JButton BRegistarDevolucionMuestra;
    private javax.swing.JButton BRegistrarAlmacenamiento;
    private javax.swing.JButton BRegistrarSobrantes;
    private javax.swing.JButton BRegresar;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
    
}
